﻿@model DateTime
@{var g="D"+Guid.NewGuid().ToString("N");}
<span class="small-input">
@Html.TextBox("", Model==null?string.Empty: string.Format("{0:yyyy-MM-dd}", Model==DateTime.MinValue?Now.Date: Model.Date), new { id = g })
<script type="text/javascript">$(function () { $('#@(g)').datepicker(); });</script>
</span>